package com.剑指offer;

public class _43左旋转字符串
{
    public static void main(String[] args)
    {
        System.out.println(LeftRotateString("qweasd", 3));
    }

    public static  String LeftRotateString(String str, int n)
    {
        int length = str.length();
        if(n > length)return "";
        String newStr = str.substring(n);
        char []chs = str.toCharArray();
        for (int i = 0; i < n; i++)
        {
            newStr += String.valueOf(chs[i]);
        }
        return newStr;
    }
}
